//引入express
const express = require('express');

//创建服务器应用
const app =express();// http  creatServer


//路由
app.get('.zihao',(req,res)=>{
    console.log(req.url);
    res.end('aaaaaaaa');
})
app.get('heixuanchen',(req,res)=>{
    console.log(req.url);
    res.end('we are familly')
})

//监听端口
app.listen(3000,err=>{
    if(!err)console.log('服务器启动成功');
    else console.log(err);
})